<template>
  <div id="app">
    <div class="edit">
      <edit @update="update"> </edit>
    </div>
    <div class="show">
      <show ref="show"> </show>
    </div>
  </div>
</template>

<script>
import edit from "./components/edit.vue";
import show from "./components/show.vue";
export default {
  name: "App",
  components: {
    edit,
    show,
  },
  data(){
    return {
      code:""
    }
  },
  methods:{
    update(e){
      console.log(e,'app');
      this.$refs.show.run(e);
    }
  }
};
</script>

<style lang="scss" scoped>
#app {
  display: flex;
  & > div {
    width: 50%;
    height: 500px;
    border: 1px solid pink;
  }
}
</style>
>
